package com.selfdriving.activity;

import net.tsz.afinal.annotation.view.ViewInject;

import com.selfdriving.R;
import com.selfdriving.bean.Preference;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

public class FreePassPortActovity extends BaseActivity {
	@ViewInject(id = R.id.btnVerify, click = "btnVerify")
	Button btnVerify;

	@ViewInject(id = R.id.ivVerify)
	ImageView ivVerify;

	private boolean isRegister = false;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.free_passport);
		isRegister = getBoolean(Preference.IS_REGISTER_SUCCESS, false);
	}

	@Override
	protected void onResume() {
		super.onResume();
		if (isRegister) {
			ivVerify.setVisibility(View.VISIBLE);
			btnVerify.setVisibility(View.GONE);
		} else {
			ivVerify.setVisibility(View.GONE);
			btnVerify.setVisibility(View.VISIBLE);
		}
	}

	public void btnVerify(View v) {
		Intent intent = new Intent(this, VerifyActivity.class);
		intent.putExtra("type", 0);
		startActivity(intent);
	}

}
